package com.menggudf.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="ageSelect")
public class AgeSelect implements Serializable{

    /**
     * 
     */
    private static final long serialVersionUID = 246063680277139624L;

    private int id;
    private Illness illness;
    private Integer ageOption;
    
    @Id
    @Column(name="id",unique=true,nullable=false)
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "illnessId", nullable = false)
    public Illness getIllness() {
        return illness;
    }
    public void setIllness(Illness illness) {
        this.illness = illness;
    }
    
    @Column(name="ageOption")
    public Integer getAgeOption() {
        return ageOption;
    }
    public void setAgeOption(Integer ageOption) {
        this.ageOption = ageOption;
    }
    
}
